package org.wlldTest.lesson1;

import java.util.Random;

public class Test {
    public static void main(String[] args) {
        //某地区房价是面积的100倍左右，那么我给出一个面积，预测出房价
        PreBody preBody = new PreBody();
        for (int i = 0; i < 50; i++) {
            test(preBody);
        }
    }

    public static void test(PreBody preBody) {
        Random random = new Random();
        for (int i = 1; i < 3; i++) {
            float s = i * 10;
            float much = s * 100 + random.nextInt(10);
            float y = preBody.insertParameter(s);//实际输出房价
            float error = much - y;//误差
            System.out.println("预测与实际的误差：" + error);
            preBody.backError(much);
        }
    }
}
